package com.swkl.yuan.agvtask.task;

import com.github.xingshuangs.iot.protocol.s7.service.S7PLC;
import com.swkl.yuan.agvtask.entity.AllConfig;

/**
 * Project: AGVTask  package:  com.swkl.yuan.agvtask.task  -  S7PLCUtil
 * Powered by zhiyuan On 2024-06-19 17:37:00
 *
 * @author alkin
 * @version 1.0
 */
public class S7PLCUtil {

    public static void writeInt16(S7PLC connector,String offset,short data){
        connector.writeInt16(getOffset(offset), data);
    }

    public static short readInt16(S7PLC connector,String offset){
        return connector.readInt16(getOffset(offset));
    }

    public static String getOffset(String offset){
        return AllConfig.dbAddress +"."+offset;
    }



}
